 @include "lib.awk"
 @include "readcsv.awk"
 @include "bins.awk"
 @include "nbins.awk"

 function readbins(n,f,name,lo,hi,goals,d,w,has,\
                       name0,lo0,hi0,goals0,d0,w0,has0,\
                       src,breaks) {
   print src= "cat " data(f ".csv")
   readcsv(name0,lo0,hi0,goals0,d0,w0,has0,src)
   print 1
   @Discretizer(n,name0,lo0,hi0,goals0,d0,w0,has0, breaks)
   print "Discretizer"
   o(breaks,"breaks")
   bins(breaks, name0,lo0,hi0,goals0,d0,w0,has0,
                name ,lo ,hi ,goals ,d ,w ,has )
 }
 
 function _bins() {
   Discretizer="nbins" 
   readBinsDemo("weather",3)
   readBinsDemo("nasa93n",3)
 }
 function readBinsDemo(f,n,    \
                    name,lo,hi,goals,d,w,has) {
   n += 0
   readbins(n,f,name,lo,hi,goals,d,w,has)
   o(name,"name");  
   o(goals,"goals"); o(w,"w");   o(has,"has"); o(d,"d"); 
   o(lo,"lo"); o(hi,"hi"); o(has,"has")
 }
